package com.duomizhibo.phonelive.ui;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;

import com.duomizhibo.phonelive.R;

public class MyViewPager extends ViewPager {


    public MyViewPager(Context context) {
        super(context);
    }

    public MyViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected boolean canScroll (View v, boolean checkV, int dx, int x, int y ) {
        ExtendedWebView view = (ExtendedWebView)v.findViewById(R.layout.paihangbang) ; //res ID
        if ( view != null ) {
            return view.canScrollHorizontally ( -dx ) ;
        } else {
            return super.canScroll ( v, checkV, dx, x, y ) ;
        }
    }
}
